<script type="text/html" id="table-form-tpl">
    <div class="container-fluid p-t-15">
        <form class="form-horizontal" id="form" action="${info.action}">
            <input type="hidden" name="id" value="${info.id}" />
            <div class="form-group">
                <label class="col-sm-2 control-label">模型名称</label>
                <div class="col-sm-10">
                    <input type="text" name="display_name" class="form-control" value="${info.display_name}"
                           datatype="*"
                    />
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">模型表名</label>
                <div class="col-sm-10">
                    <div class="input-group">
                        <span class="input-group-addon">cms_detail_</span>
                        {@if info.id>0}
                        <input type="text" name="table_name" class="form-control" value="${info.table_name}" readonly
                               datatype="/^[a-z]{3,10}$/i"
                               errormsg="请正确填写表名"
                        />
                        {@else}
                        <input type="text" name="table_name" class="form-control" value="${info.table_name}"
                               datatype="/^[a-z]{3,10}$/i"
                               errormsg="请正确填写表名"
                        />
                        {@/if}
                    </div>
                    <p class="help-block">表名只能为小写字母,3-10位</p>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">排序</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control f-number" name="show_order" value="${info.show_order}"
                           data-type="number"
                           datatype="n"
                    />
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-10 col-sm-offset-2">
                    <div class="pull-left">
                        <button type="button" class="btn btn-primary btn-sub">保存</button>
                        <button type="button" class="btn btn-default btn-reset">重置</button>
                    </div>
                    <div class="pull-left m-l-15">
                        <p class="error-msg"></p>
                    </div>
                </div>
            </div>
        </form>
    </div>
</script>
<script type="text/html" id="refresh-tpl">
    <div class="container-fluid p-t-15" id="refresh-box">
        {volist name=":D('cms.Table')->order('show_order asc')->select()" id="vo"}
        <label class="checkbox checkbox-info m-b-15">
            <input type="checkbox" name="table_name[]" value="{$vo.table_name}" checked />
            <span>{$vo.display_name}</span>
        </label>
        {/volist}
    </div>
</script>